// ignore_for_file: must_be_immutable

import 'package:aitao_flutter/res/r.dart';
import 'package:aitao_flutter/style/box_style.dart';
import 'package:aitao_flutter/style/color_style.dart';
import 'package:aitao_flutter/style/radius_style.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class AuthenticationWindow extends StatefulWidget {
  AuthenticationWindow({super.key, required this.authenticationCallBack});
  VoidCallback authenticationCallBack;
  @override
  State<AuthenticationWindow> createState() => _AuthenticationWindowState();
}

class _AuthenticationWindowState extends State<AuthenticationWindow> {
  @override
  Widget build(BuildContext context) {
    return Center(
      child: Container(
          decoration: BoxDecoration(
            borderRadius: RadiusStyle.radiusAll(10),
            color: Colors.white,
          ),
          child: Column(
              mainAxisSize: MainAxisSize.min,
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Image.asset(
                  ImagePath.assetsAuthenticationTop,
                  height: 150.w,
                  fit: BoxFit.fill,
                ),
                Box.vBox20,
                const Text(
                  '请先认证，通过认证后可成为女神',
                  textAlign: TextAlign.center,
                  style: TextStyle(
                      fontSize: 16,
                      color: Color(0xFF333333),
                      fontWeight: FontWeight.bold),
                ),
                Box.vBox10,
                const Text(
                  '赚取收益',
                  textAlign: TextAlign.center,
                  style: TextStyle(
                      fontSize: 16,
                      color: Color(0xFF333333),
                      fontWeight: FontWeight.bold),
                ),
                // Box.vBox20,
                GestureDetector(
                  child: Container(
                    // width: double.infinity,
                    width: 200.w,
                    height: 40.w,
                    alignment: Alignment.center,
                    margin: const EdgeInsets.only(top: 20, bottom: 20),
                    decoration: BoxDecoration(
                        color: ColorStyle.themeColor,
                        borderRadius: RadiusStyle.radiusAll(20.w)),
                    child: const Text(
                      '认证',
                      style: TextStyle(fontSize: 16, color: Colors.white),
                    ),
                  ),
                  onTap: () {
                    widget.authenticationCallBack();
                  },
                )
              ])),
    );
  }
}
